package com.guigu.guliproduct.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;

@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class AddCategoryDto {
    @NotBlank(message = "分类名称不能为空")
    @ApiModelProperty(value = "分类名称")
    private String name;

    @NotNull(message = "父分类id不能为空")
    @ApiModelProperty(value = "父分类id")
    private Long  parentCid;

    @Range(max = 10000L, message = "层级最小为0,最大为1")
    @NotNull(message = "层级不能为空")
    @ApiModelProperty(value = "层级")
    private BigInteger catLevel;


    @Range(max = 1L, message = "是否显示状态不能为空,最小为0,最大为1")
    @NotNull(message = "是否显示状态不能为空")
    @ApiModelProperty(value = "是否显示[0-不显示，1显示]")
    private BigInteger showStatus;

    @Range(max = 100L, message = "排序不能为空,最小为0,最大为100")
    @NotNull(message = "排序不能为空")
    @ApiModelProperty(value = "排序")
    private BigInteger sort;

    @ApiModelProperty(value = "图标地址")
    private String icon;

    @ApiModelProperty(value = "计量单位")
    private String productUnit;

    @ApiModelProperty(value = "商品数量")
    private Integer productCount;

}
